package day05;

public class ExText05 {
    public static void main(String[] args) {
     //打印*等腰三角符
         for (int i=1;i<=4;i++){
             for (int k=1;k<=4-i;k++){
                 System.out.print(" ");
             }
             for (int j=1;j<=2*i-1;j++){

                     System.out.print("*");
             }

             System.out.println();
         }












        //利用循环计算：求8的阶乘
        //1*2*3*4*5*6*7*8
        int product=1;
        for (int i=1;i<9;i++){
            product*=i;

        }
        System.out.println(product);
















       //利用循环算法：求数字1到100以内所有偶数的和
        int sum=0;
        for (int i=1;i<=100;i++){
             if (i%2==0){
                 sum+=i;
             }
        }
        System.out.println(sum);
    }
}
